<#macro minMaxReading name var format="%.1s">
        <td class="reading">
        <h2>${name}</h2>
        <#if var.current?has_content>
        <h1 class="reading">${var.current.format(format)}</h1>
        <p> <#if var.min.unitValue.value?has_content > Min: ${var.min.format(format + " @ %tc")}</#if></p>
        <p> <#if var.max.unitValue.value?has_content > Max: ${var.max.format(format + " @ %tc")}</#if></p>
        </#if>       
        </td>
</#macro>
<#include "include.ftl">
<@page title=stationName >

<h1>${stationName} ${readings.readingTime?datetime}</h1>

<table>
    <tr>
	  <@minMaxReading name="Indoor Temperature" var=readings.indoorTemperature/>
	  <@minMaxReading name="Indoor Humidity" var=readings.indoorHumidity/>
	  <@minMaxReading name="Outdoor Temperature" var=readings.outdoorTemperature/>
	  <@minMaxReading name="Outdoor Humidity" var=readings.outdoorHumidity/>	  
    </tr>
    <tr>
	  <@minMaxReading name="Air Pressure" var=readings.airPressure/>
	  <@minMaxReading name="Wind Speed" var=readings.windSpeed/>
	  <@minMaxReading name="Rain 1hr" var=readings.rain1H/>
	  <@minMaxReading name="Rain 24hr" var=readings.rain24H/>	  
    </tr>
</table>

</@page>
        